package com.multi.thread.chapter07.demo01;

public class MyThread04 {
	
	public static final Byte lock = new Byte("0");
	
	static class MyThread extends Thread {
		@Override
		public void run() {
			try {
				synchronized (lock) {
					lock.wait();
				}
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}
	
	public static void main(String[] args) throws InterruptedException {
		MyThread t = new MyThread();
		t.start();
		Thread.sleep(1000);
		System.out.println("main方法中的t状态：" + t.getState());
	}

}
